Convert a varying string into a character string (fixed length)
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(varying_string), | intent(in) | :: | string | |||
integer, | intent(in) | :: | length |
pure function char_fixed (string, length) result (char_string) type(varying_string), intent(in) :: string integer, intent(in) :: length character(LEN=length) :: char_string char_string = char(string) ! Finish return end function char_fixed